package com.das.mechanic_alone.mvp.contract.alone;

import android.content.Context;

import com.das.mechanic_base.base.X3IBaseView;
import com.das.mechanic_base.bean.alone.AloneImageAndRecordBean;
import com.das.mechanic_base.bean.alone.AloneNewBean;
import com.das.mechanic_base.bean.alone.TestRecommendBean;
import com.das.mechanic_base.bean.common.AwsFileBean;
import com.das.mechanic_base.bean.greendao.AloneServiceListBean;

import java.io.File;
import java.util.List;

/**
 * Created by chenSi on 2018/3/13.
 */

public interface X3AloneContract {


    interface View extends X3IBaseView {

        /**
         * 提供整体数据
         * @return
         */
        List<AloneNewBean.ItemQuestionListBean> providerAloneNewBeans();

        /**
         * 提供系统id
         */
        long providerToSystemId();

        /**
         * 返回对应页面的值
         * @return
         */
        long providerToSystem();

        /**
         * 返回施工单id
         * @return
         */
        long providerWorkBaseId();

        void back();

        /**
         * 根据题型 动态生成布局
         * isCreate 是否是第一次进入
         */
        void switchAloneSystem(List<AloneNewBean.ItemQuestionListBean> aloneBeans,boolean isCreate);

        void keepAlone(long titleIndex,long sonIndex,String type,String content);

        void submitAlone(List<AloneNewBean.ItemQuestionListBean> aloneTyreBeans);

        /**
         * 展示提交成功之后的dialog
         */
        void showSuccessDialog();

        /**
         * 展示提交成功之后的dialog
         */
        void showItemHotCommentSuc(List<String> comments);

        /**
         * 提交评价
         * @return
         */
        String providerContent();

        /**
         * 返回录音文件 亚马逊上传
         * @param isSuccess
         * @param awsFileBean
         */
        void getAwsSoundIdSuccess(boolean isSuccess, AwsFileBean awsFileBean,String id);

        /**
         * 更新图片成功
         * @param aloneImageAndRecordBean
         * @param titleIndex
         * isUpload 是否是上传图片  false为删除图片
         */
        void getUpdatePictureSuccess(AloneImageAndRecordBean aloneImageAndRecordBean,long titleIndex,boolean isUpload);

        /**
         * 回传当前总里程和日均里程
         */
        void showCurrenMiles(double currentMiles,double perMiles);

        /**
         * 当前页面是否销毁
         * @return
         */
        Boolean isViewFinishing();

        String providerTitle();

        /**
         * 将网络上请求的购物车数据存储到本地
         */
        void saveService(List<AloneServiceListBean> serviceListBeans);

        void getDetectionServiceListForRefresh(List<AloneServiceListBean> mList);

        /**
         * 保存录音id
         * @param evaluaId
         */
        void saveSoundId(long evaluaId);

        // 获取技师评论
        void getEvaluationContent(String evaluation);

        Context getContext();

        //获取猜你推荐
        void getServiceBaseListLikeSus(List<TestRecommendBean> list, long questionBaseId, long titleIndex, String decTitle, long questionOptionId ,List<AloneNewBean.ItemQuestionListBean.QuestionDetectionTempletQuestionListBean.QuestionCarMilesDeductionEntityListBean> deductionList);
    }

    interface Presenter {

        void start();

        void providerAloneBean();

        /**
         * 新增加字段
         * @param aloneTyreBeans
         */
        void submitAloneData(List<AloneNewBean.ItemQuestionListBean> aloneTyreBeans,long soundId);

        /**
         * 上传或者删除图片
         * @param resId
         * isUpload 是否是上传图片  false为删除图片
         */
        void saveOrUpdateWorkResource(long resId,long titleIndex,boolean isUpload,String filePath);

        /**
         * 获取购物车数据
         */
        void getDetectionServiceList();

        /**
         * 请求新的购物车用于刷新数据
         */
        void getDetectionServiceListForRefresh();

        /**
         * 提交购物车数据
         */
        void saveDetectionServiceList(List<AloneServiceListBean> mList);

        /**
         * 更改购物车数据的时候 更新后台数据
         */
        void saveDetectionService(List<AloneServiceListBean> mList);

        /**
         * 上传音频文件
         * @param wavFile
         */
        void uploadWavAws(File wavFile,String id);

        /**
         * 上传图片
         * @param imgFile
         */
        void uploadImageAws(File imgFile,long titleIndex);

        void obtainAloneBean();

        void getServiceBaseListLike(long questionBaseId,long questionOptionId,long workBaseId,long titleIndex, String decTitle, List<AloneNewBean.ItemQuestionListBean.QuestionDetectionTempletQuestionListBean.QuestionCarMilesDeductionEntityListBean> deductionList);


        /**
         * 更改购物车数据的时候 更新后台数据
         */
        void getItemHotComment(long questionBaseId);
    }
}
